home *** CD-ROM | disk | FTP | other *** search
- #ifndef FWTRYBLO_H
- #define FWTRYBLO_H
-
- //========================================================================================
- //
- // File: FWTryBlo.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: (c) 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FW_NATIVE_EXCEPTIONS
-
- #include <setjmp.h>
-
- #ifndef FWEXCTAS_H
- #include "FWExcTas.h"
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // CLASS FW_CPrivTryBlockContext
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CPrivTryBlockContext
- {
- public:
- FW_CPrivTryBlockContext(FW_SPrivExceptionGlobals& globals, jmp_buf buffer);
- ~FW_CPrivTryBlockContext();
-
- void *operator new(size_t, void *);
- void operator delete(void *);
-
- FW_SPrivExceptionGlobals& fGlobals;
- class FW_CPrivTryBlockContext *fPriorContext;
- _FW_StackEntries fDeleteStackLevel;
- jmp_buf *fJumpBuffer;
-
- #ifdef FW_DEBUG
- short fAutomaticsInMyScope;
- unsigned short fTraceDepth;
- void CheckClassInvariants(FW_SPrivExceptionGlobals& globals);
- #endif
-
- private:
-
- static FW_CPrivTryBlockContext *MakeCurrent(FW_SPrivExceptionGlobals& globals,
- FW_CPrivTryBlockContext *context);
-
- };
-
- //----------------------------------------------------------------------------------------
- // FW_CPrivTryBlockContext::operator new
- //----------------------------------------------------------------------------------------
-
- inline void* FW_CPrivTryBlockContext::operator new(size_t, void *ptr)
- {
- return ptr;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CPrivTryBlockContext::operator delete
- //----------------------------------------------------------------------------------------
-
- inline void FW_CPrivTryBlockContext::operator delete(void *)
- {
- }
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif // FW_NATIVE_EXCEPTIONS
-
- #endif
-